function n = calcSlidingWindows(windowSize, start, finish)
% Calculates number of sliding windows

failIfFalse(isscalar(windowSize) && isscalar(start) && isscalar(finish), 'Scalar value expected');

n = ((finish - start + 2) - windowSize);